package com.x8.mt.controller;

import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONObject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.x8.mt.common.GlobalMethodAndParams;
import com.x8.mt.common.Log;
import com.x8.mt.service.DataAnalysisService;

@CrossOrigin(origins = "*", maxAge = 3600)//解决跨域请求的注解
@Controller
@RequestMapping(value = "/transData")
public class TransDataController {
	
	/**
	 * 
	 * 作者:allen
	 * 时间:2017年11月22日
	 * 作用:血统分析，分析targetfield字段来源
	 * 参数：id(targetfield的id)
	 */
	@RequestMapping(value = "/pedigreeAnalysis",method=RequestMethod.POST)
	@ResponseBody
	@Log(operationType="dataAnalysis",operationDesc="血统分析")
	public JSONObject pedigreeAnalysis(HttpServletRequest request,HttpServletResponse response,@RequestBody Map<String, Object> map){
		JSONObject responsejson = new JSONObject();

//		if(!GlobalMethodAndParams.checkLogin()){
//			responsejson.put("result", false);
//			responsejson.put("count",0);
//			return responsejson;
//		}
		GlobalMethodAndParams.setHttpServletResponse(request, response);
		
		return responsejson;
	}
}
